Search
BarSeries Constructor (List<Number> | Array<Nuber>, List<String> | Array<String>, List<String> | Array<String>, List<String> | Array<String>)
See Also
 






Initializes a new instance of the BarSeries class.

Namespace: MindFusion.Charting
File: BarSeries.js

 Syntax

JavaScript  Copy Code

function BarSeries (values, innerLabels, [topLabels, [xAxisLabels]])

 Parameters

values

A list of data values.

innerLabels

A list of inner labels.

topLabels
Optional.

A list of top labels.

xAxisLabels
Optional.

A list of X axis labels.

 Example

The following code creates two BarSeries with data and outer labels and a new BarStackRenderer using these series.

JavaScript  Copy Code

//the second argument specifies the inner labels, the third argument specifies the top(outer) labels
var data1 = new Charting.BarSeries(
 [13, 13, 14, 16, 23, 44], null, ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]);
var data2 = new Charting.BarSeries([22, 18, 25, 34, 51, 44, 8], null, ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]);

var barRenderer = new Charting.BarStackRenderer(new Collections.ObservableCollection([data1, data2]));

 See Also